<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>购买</title>
<style>
.tb {
	border: 1px solid blue;
	border-collapse: collapse; /*设置表格的边框合并为一个单一的边框*/
	width: 800px;
	margin: 10px auto;
}

.tb th,td {
	border: 1px solid blue;
	padding: 10px;
}
</style>
</head>

<body>
	<table class="tb">
		<tr>
			<th>名称</th>
			<th>价格(元/斤)</th>
			<th>操作</th>
		</tr>
		<tr>
			<td>苹果</td>
			<td>2.8</td>
			<td><a href="doAction1.jsp?action=buy&id=0">购买</a></td>
		</tr>
		<tr>
			<td>香蕉</td>
			<td>3.1</td>
			<td><a href="doAction1.jsp?action=buy&id=1">购买</a></td>
		</tr>
		<tr>
			<td>梨</td>
			<td>2.5</td>
			<td><a href="doAction1.jsp?action=buy&id=2">购买</a></td>
		</tr>
		<tr>
			<td>橘子</td>
			<td>2.3</td>
			<td><a href="doAction1.jsp?action=buy&id=3">购买</a></td>
		</tr>
		<tr>
			<td colspan="3"><a href="doAction1.jsp?action=showCar">查看购物车</a></td>
		</tr>
	</table>
</body>
</html>
